Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cheat: tunic upgrades #501

Closed
wants to merge 10 commits into from
Closed

Conversation

vaguerant
Copy link
Contributor

@vaguerant vaguerant commented Jun 18, 2022

EDIT: Description is entirely outdated, the option to equip new items has been removed per MelonSpeedruns. This PR is now a cheat to enhance tunics. /EDIT

Inspired by #482 but does not implement all of what that suggests.

There's a few things being added here:

  • an Auto-Equips checkbox (gAutoEquips): when enabled, new equipment (Swords, Shields, Tunics) is automatically equipped when you obtain it
  • a Tunic Upgrades slider (gAutoTunics): allows three levels of customization for different tunic upgrades
    • Off: No upgrades
    • Auto-Switch: Automatically switch to your best tunic for the current situation (essentially: Zora Tunic if you're in the water, Goron Tunic if you aren't)
    • Permanent Upgrade: Treat owned tunics like upgrades that are always active once you have them
    • Super Tunic: Makes every tunic have the effects of every other tunic (this is the same Super Tunic from Add cheats menu and move Debug Mode to Developer Tools. #105, just incorporated into the Tunic Upgrades slider)

Auto-Switch and Permanent Upgrades both check your currently owned equipment before performing their functions, so they provide no practical advantage beyond not needing to go into the menu to switch tunics manually. They provide essentially the same functionality in different ways, one visibly, audibly and actually swapping the tunics while the other allows you to use whichever tunic you prefer.

It might be somewhat controversial to move the Super Tunic into the Enhancements menu, but it changes the game by such a small degree that consolidation seemed reasonable. If you know what you're doing, you don't even need the Goron/Zora Tunics, so getting their benefits "early" with Super Tunic doesn't actually allow you access to anything you couldn't already do. This was mentioned on Discord and I got two positive responses and no negative ones. Probably not statistically significant!

The Auto-Switch and Permanent Upgrade settings in the Tunic Upgrades potentially have some interactions with (currently approved but un-merged) #379, due to the gNoRestrictAge cheat it adds which allows Child Link to use adult items and vice versa. In those cases, I'm checking against the non-existent CVar in anticipation of that PR being merged. There should be no side-effects from checking the CVar as I've defaulted it to zero here, so merge order should not be a concern.

This is the deepest I've gone messing with anything in either OoT or ImGui, so I'm very open to suggestions if anything looks wrong. In my testing, the auto-equips and all four tunic upgrade modes seem to be working as expected. I'm pretty iffy on that ImGui slider. I do all my development and testing on the Wii U fork, which currently doesn't support interacting with ImGui.

EDIT: Just pushed another small commit to add age restriction checks to gAutoEquips similar to what gAutoTunics already had. In normal gameplay, it's not possible to obtain the Biggoron's Sword, Mirror Shield, etc. as a child, which was why I never bothered age-restricting the auto-equips, but on further thought you can obtain the Mirror Shield as a child via glitches, and anything could happen in mods or randomizers. Now equipment will only auto-equip if you're actually allowed to equip them currently (again, also checks against gNoRestrictAge, so if players do want to auto-equip age-inappropriate items they can use that cheat in concert with this enhancement.

@SomeoneIsWorking
Copy link

I like permanent upgrade

@jbodner09
Copy link
Contributor

Sweet, now I can just use gAutoEquips for the later C button work!

@vaguerant vaguerant changed the title Enhancements: auto-equips/tunic upgrades Enhancements: auto-equips/tunic upgrades; Jenkins poke? Jun 21, 2022
@vaguerant vaguerant changed the title Enhancements: auto-equips/tunic upgrades; Jenkins poke? Enhancements: auto-equips/tunic upgrades Jun 21, 2022
@MelonSpeedruns
Copy link
Contributor

There's too many similar options here. I don't think we want the auto-equips checkbox, but we probably do want the tunics upgrade slider. We would want to remove the existing super tunic checkbox in favour of the slider. Also, the slider can probably go to the Cheats menu.

@vaguerant
Copy link
Contributor Author

There's too many similar options here. I don't think we want the auto-equips checkbox, but we probably do want the tunics upgrade slider.

For clarity, @jbodner09 has expressed interest in expanding on auto-equips to include a way to equip new C-button items without needing to navigate the pause menu. Should that concept also not be pursued?

We would want to remove the existing super tunic checkbox in favour of the slider.

This PR does that already.

Also, the slider can probably go to the Cheats menu.

Will do.

@vaguerant vaguerant changed the base branch from develop to master June 22, 2022 16:42
@vaguerant vaguerant changed the base branch from master to develop June 22, 2022 16:42
@vaguerant vaguerant changed the title Enhancements: auto-equips/tunic upgrades Cheat: tunic upgrades Jun 23, 2022
@jbodner09
Copy link
Contributor

No problem, I can look at the history of this one when I'm ready to add auto-equipping fully.

@vaguerant
Copy link
Contributor Author

No problem, I can look at the history of this one when I'm ready to add auto-equipping fully.

FYI, I actually kept working on equips and will probably attempt another PR of it once #507 gets merged in spite of the rejection here, since it's improved over what used to be in this PR and I believe it would make a strong "Time Saver" enhancement as laid out in 507 (check the changes rather than the description, as it does more than the original PR filing now).

Instead of just auto-equipping, my current version edits the new item obtained message and adds a new prompt, "Would you like to equip it now?" This is very similar to what was talked about previously for C-button items, although in this case it's of course a simple Yes/No choice. I think this version is much better suited to your C-button idea since it's already along much closer lines.

I don't have this version pushed anywhere yet because there's several unmerged PRs it will conflict with, but I can throw it up in a junk branch somewhere if you want to look at it sooner.

@jbodner09
Copy link
Contributor

I don't have this version pushed anywhere yet because there's several unmerged PRs it will conflict with, but I can throw it up in a junk branch somewhere if you want to look at it sooner.

No rush, I know I won't be looking into it for at least a couple of weeks!

@vaguerant vaguerant changed the base branch from develop-rachael to develop-zhora July 26, 2022 09:54
@vaguerant
Copy link
Contributor Author

Had this backburnered for a bit, finally got around to rebasing on Zhora. I also switched it from a slider to a drop-down box, as it just made more sense UI-wise.

Since it's been a while, a reminder that what this actually does is add a drop-down menu "Tunic Upgrades" under Cheats:

  • Off: No upgrades
  • Auto-Switch: Automatically switch to your best tunic for the current situation
  • Permanent Upgrade: Treat owned tunics like upgrades that are always active once you have them
  • Super Tunic: Makes every tunic have the effects of every other tunic

That last is a cheat which already existed in SoH, this PR absorbs it into the drop-down.

@briaguya-ai
Copy link
Contributor

I've gone back and forth thinking about this one a few times. It adds quite a bit of complexity to the codebase, and functionally isn't too different than just having super tunic as an option.

The big difference i see is the idea of tunics as permanent upgrades. It's a super cool idea, but it feels like it's moving into mod territory instead of cheat territory.

I'm going to close this PR for now, I've added a link to it in #1821 so we don't forget about it when building out modding/scripting support.

I also took a wayback machine snapshot of the latest jenkins PR build https://web.archive.org/web/20221021055949/https://builds.shipofharkinian.com/job/SoH_Multibranch/job/PR-501/12/ so anyone who stumbles across this can try it out without building from source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants